package com.ruoyi.crm.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.crm.mapper.CrmOrderCollectDetailsMapper;
import com.ruoyi.crm.domain.CrmOrderCollectDetails;
import com.ruoyi.crm.service.ICrmOrderCollectDetailsService;

/**
 * 商机收款详情Service业务层处理
 *
 * @author yanwenliang
 * @date 2024-11-27
 */
@Service
public class CrmOrderCollectDetailsServiceImpl extends ServiceImpl<CrmOrderCollectDetailsMapper, CrmOrderCollectDetails> implements ICrmOrderCollectDetailsService
{
    @Autowired
    private CrmOrderCollectDetailsMapper crmOrderCollectDetailsMapper;

    /**
     * 查询商机收款详情
     *
     * @param collectDetailsId 商机收款详情主键
     * @return 商机收款详情
     */
    @Override
    public CrmOrderCollectDetails selectCrmOrderCollectDetailsByCollectDetailsId(String collectDetailsId)
    {
        return crmOrderCollectDetailsMapper.selectCrmOrderCollectDetailsByCollectDetailsId(collectDetailsId);
    }

    /**
     * 查询商机收款详情列表
     *
     * @param crmOrderCollectDetails 商机收款详情
     * @return 商机收款详情
     */
    @Override
    public List<CrmOrderCollectDetails> selectCrmOrderCollectDetailsList(CrmOrderCollectDetails crmOrderCollectDetails)
    {
        return crmOrderCollectDetailsMapper.selectCrmOrderCollectDetailsList(crmOrderCollectDetails);
    }

    /**
     * 新增商机收款详情
     *
     * @param crmOrderCollectDetails 商机收款详情
     * @return 结果
     */
    @Override
    public int insertCrmOrderCollectDetails(CrmOrderCollectDetails crmOrderCollectDetails)
    {
        return crmOrderCollectDetailsMapper.insertCrmOrderCollectDetails(crmOrderCollectDetails);
    }

    /**
     * 修改商机收款详情
     *
     * @param crmOrderCollectDetails 商机收款详情
     * @return 结果
     */
    @Override
    public int updateCrmOrderCollectDetails(CrmOrderCollectDetails crmOrderCollectDetails)
    {
        return crmOrderCollectDetailsMapper.updateCrmOrderCollectDetails(crmOrderCollectDetails);
    }

    /**
     * 批量删除商机收款详情
     *
     * @param collectDetailsIds 需要删除的商机收款详情主键
     * @return 结果
     */
    @Override
    public int deleteCrmOrderCollectDetailsByCollectDetailsIds(String[] collectDetailsIds)
    {
        return crmOrderCollectDetailsMapper.deleteCrmOrderCollectDetailsByCollectDetailsIds(collectDetailsIds);
    }

    /**
     * 删除商机收款详情信息
     *
     * @param collectDetailsId 商机收款详情主键
     * @return 结果
     */
    @Override
    public int deleteCrmOrderCollectDetailsByCollectDetailsId(String collectDetailsId)
    {
        return crmOrderCollectDetailsMapper.deleteCrmOrderCollectDetailsByCollectDetailsId(collectDetailsId);
    }
}
